import json

import sys,os
from config import BASEDTR

def read_login_data(file):
   # BASEDTR=os.path.dirname(__file__)
    filePath=BASEDTR+"\\data\\ihrm_add_emp.json"
    #path="../data/"+file
    #file_path=BASEDTR+"\data\"+fileName
    #with open("../data/ihrm_add_emp.json","r",encoding="utf-8") as f:
    #with open("../data/ihrm_login_data.json","r",encoding="utf-8") as f:
    with open(filePath, "r", encoding="utf-8") as f:
        old_data=json.load(f)
    data_list=[]
    for item in old_data:
        tup1=tuple(item.values())
        data_list.append(tup1)
    return  data_list

if __name__ == '__main__':
    resp=read_login_data("ihrm_add_emp.json")
    print(resp)